/*
 * Transform.h
 *
 *  Created on: 28 Oct 2012
 *      Author: guy
 */

#ifndef TRANSFORM_H_
#define TRANSFORM_H_

#include "core/Component.h"
#include "types/Vector2D.h"
#include "types/Matrix2D.h"
#include <tr1/memory>
#include <vector>

namespace SolidityEngine {

class Transform2D;

typedef std::tr1::shared_ptr<Transform2D> Transform_ptr;

class Transform2D: public Component {
	Vector2D _position;
	Matrix2D _rotation;

public:

    Transform2D();

	const Vector2D Position() const;
	Vector2D& Position();

	const Matrix2D Rotation() const;
	Matrix2D& Rotation();

    void Translate(const Vector2D& vector);

    void Rotate(float angle);

    void TranslateLocal(const Vector2D& vector);

private:
    virtual Transform2D* _Clone();
    std::string _Serialize(){
        return std::string("Serialization not implemented for: ")+std::string(typeid(*this).name());
    };
};

} /* namespace SolidCore */
#endif /* TRANSFORM_H_ */
